<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id = "app">
        <!-- 1、直接遍历拿到的是对象的value -->
        <ul>
            <li v-for="item in info">{{item}}</li>
        </ul>

        <!-- 2、可以拿到对象的key 格式：（value,key） -->
        <ul>
            <li v-for="(value,key) in info">{{value}}-{{key}}</li>
        </ul>

         <!-- 3、可以拿到对象的index 格式：（value,key,index） -->
         <ul>
            <li v-for="(value,key,index) in info">{{value}}-{{key}}-{{index+1}}</li>
        </ul>
        
    

    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                info:{
                    name:'hello',
                    age:12,
                    height:1.66
                }
            },
        })

    </script>
</body>

</html>